package com.ruoyi.server.utils;

import com.ruoyi.server.enums.CmdConstants;
import com.ruoyi.server.pkg.SendMsg;
import io.netty.channel.ChannelHandlerContext;

import java.util.Set;

/**
 * 发送消息工具
 *
 * @author OpenACloud
 * @create 2024/6/13 14:49
 */
public class SendUtil {

   public static void sendMsg(ChannelHandlerContext ctx, SendMsg sendMsg){
       Long receiveId = sendMsg.RECEIVEID;
       Set<Long> userFriend = ctx.attr(OnlineUtil.USER_FRIEND).get();
       if(!userFriend.contains(receiveId)) {
           SendMsg notSendMsg = new SendMsg();
           notSendMsg.CMD = CmdConstants.PRIVATE_CMD;
       }
   }


}
